﻿using Myotragus.Data.Emit;
using Myotragus.Store.Model.Tests.Domain;
using NUnit.Framework;

namespace Myotragus.Store.Model.Tests
{
  [TestFixture]
  public class AutoPropertyGenerationFixture
  {
    [SetUp]
    public void SetUp()
    {
      FixtureHelper.InitializeServices();

      Generator = FixtureHelper.Container.Resolve<IAutoProperties>();
    }

    protected IAutoProperties Generator
    {
      get;
      set;
    }

    [Test]
    public void Generate()
    {
      var tObj1 = Generator.GetImplementation(typeof(IObject));
      var tObj2 = Generator.GetImplementation(typeof(IObject));

      Assert.AreEqual(tObj1, tObj2);
    }
  }
}
